package com.ruoyi.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 物料信息管理对象 erp_material
 * 
 * @author zhp
 * @date 2025-07-30
 */
public class ErpMaterial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 物料编码 */
    private String materialCode;

    /** 物料名称 */
    private String materialName;

    /** 规格型号 */
    private String materialSpecification;

    /** 单位 */
    private String unit;

    /** 物料类型ID */
    private Long typeId;

    /** 物料分类ID */
    private Long categoryId;

    /** 最小库存 */
    private BigDecimal minStock;

    /** 最大库存 */
    private BigDecimal maxStock;

    /** 安全库存 */
    private BigDecimal safeStock;

    /** 状态(0:停用,1:启用) */
    private Long status;

    /** 创建时间 */
    private Date createdAt;

    /** 更新时间 */
    private Date updatedAt;


    private ErpMaterialType erpMaterialType;

    private ErpMaterialCategory erpMaterialCategory;


    public ErpMaterialType getErpMaterialType() {
        return erpMaterialType;
    }

    public void setErpMaterialType(ErpMaterialType erpMaterialType) {
        this.erpMaterialType = erpMaterialType;
    }

    public ErpMaterialCategory getErpMaterialCategory() {
        return erpMaterialCategory;
    }

    public void setErpMaterialCategory(ErpMaterialCategory erpMaterialCategory) {
        this.erpMaterialCategory = erpMaterialCategory;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setMaterialCode(String materialCode) 
    {
        this.materialCode = materialCode;
    }

    public String getMaterialCode() 
    {
        return materialCode;
    }

    public void setMaterialName(String materialName) 
    {
        this.materialName = materialName;
    }

    public String getMaterialName() 
    {
        return materialName;
    }

    public void setMaterialSpecification(String materialSpecification) 
    {
        this.materialSpecification = materialSpecification;
    }

    public String getMaterialSpecification() 
    {
        return materialSpecification;
    }

    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }

    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setMinStock(BigDecimal minStock) 
    {
        this.minStock = minStock;
    }

    public BigDecimal getMinStock() 
    {
        return minStock;
    }

    public void setMaxStock(BigDecimal maxStock) 
    {
        this.maxStock = maxStock;
    }

    public BigDecimal getMaxStock() 
    {
        return maxStock;
    }

    public void setSafeStock(BigDecimal safeStock) 
    {
        this.safeStock = safeStock;
    }

    public BigDecimal getSafeStock() 
    {
        return safeStock;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("materialCode", getMaterialCode())
            .append("materialName", getMaterialName())
            .append("materialSpecification", getMaterialSpecification())
            .append("unit", getUnit())
            .append("typeId", getTypeId())
            .append("categoryId", getCategoryId())
            .append("minStock", getMinStock())
            .append("maxStock", getMaxStock())
            .append("safeStock", getSafeStock())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
